package cn.itcast.service.impl;

import cn.itcast.dao.AccountDao;
import cn.itcast.dao.GoodDao;
import cn.itcast.domain.Account;
import cn.itcast.domain.Good;
import cn.itcast.service.AccountService;
import cn.itcast.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sun.javafx.collections.MappingChange.Map;

import java.util.HashMap;
import java.util.List;

@Service
public class GoodServiceimpl implements GoodService {
    @Autowired
    private GoodDao goodDao;

    @Override
    public List<Good> findAll() {
        return goodDao.findAll();
    }

	@Override
	public Good findById(Integer id) {
		HashMap<String, Integer> map=new HashMap<String, Integer>();
		map.put("id",id);
		return goodDao.findById(map);
	}
}
